﻿<phone:PhoneApplicationPage 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:Yelper_Phone_ValueConverters="clr-namespace:Yelper.Phone.ValueConverters"
    xmlns:yelper="clr-namespace:Yelper.Phone"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="Yelper_Phone.YelpDetail"
	Orientation="Portrait"
    SupportedOrientations="PortraitOrLandscape"
	shell:SystemTray.IsVisible="True">

	<phone:PhoneApplicationPage.Resources>
		<Yelper_Phone_ValueConverters:YelpTimeAgoFormatter x:Key="YelpTimeAgoConverter" />
	</phone:PhoneApplicationPage.Resources>
	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>

	<!--LayoutRoot is the root grid where all page content is placed-->
	<Grid x:Name="LayoutRoot" Background="Transparent">
		
		<!--ContentPanel - place additional content here-->
		<Grid x:Name="ContentPanel" Margin="20,20,20,0">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="Auto"/>
			</Grid.RowDefinitions>
			<Grid x:Name="HeaderGrid" Margin="0,10,0,0" d:LayoutOverrides="VerticalMargin" VerticalAlignment="Top">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition Width="Auto"/>
				</Grid.ColumnDefinitions>
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
				</Grid.RowDefinitions>
				<Border Grid.RowSpan="2" Background="#FF7E7E7E" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,0,15,0">
                    <Image Source="{Binding User.ProfilePicture, Converter={StaticResource ProfilePictureConverter}, Mode=OneWay}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="50" Height="50"/>
				</Border>				
				<TextBlock Text="{Binding User.Username, Converter={StaticResource AtToUpperConverter}}" FontWeight="Bold" FontSize="20" VerticalAlignment="Top" Grid.Column="1"/>
				<TextBlock Text="{Binding User.FullName}" FontWeight="Bold" FontSize="20" VerticalAlignment="Top" Grid.Row="1" Grid.Column="1"/>				
			</Grid>
            <yelper:LinkTextBlock Text="{Binding Message}" VerticalAlignment="Top" Grid.Row="1" FontSize="32" Margin="0,20,0,0" />			
			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding YelpDate}" VerticalAlignment="Top" Grid.Row="2" Margin="0,10,0,0"/>
		</Grid>
	</Grid>
</phone:PhoneApplicationPage>